using System;

namespace Outcoding.GraphGenerator.Entities {
    public class XlLineStyleHelper {
        public static XlLineStyle ConvertFromString(string xlLineStyle) {
            XlLineStyle value = XlLineStyle.xlUnknown;
            switch(xlLineStyle){
                case "xlContinuous":
                    value = XlLineStyle.xlContinuous;
                    break;
                case "xlDash":
                    value = XlLineStyle.xlDash;
                    break;
                case "xlDashDot":
                    value = XlLineStyle.xlDashDot;
                    break;
                case "xlDashDotDot":
                    value = XlLineStyle.xlDashDotDot;
                    break;
                case "xlDot":
                    value = XlLineStyle.xlDot;
                    break;
                case "xlDouble":
                    value = XlLineStyle.xlDouble;
                    break;
                case "xlLineStyleNone":
                    value = XlLineStyle.xlLineStyleNone;
                    break;
                case "xlSlantDashDot":
                    value = XlLineStyle.xlSlantDashDot;
                    break;
            }
            return value;
        }
    }
}
